package com.yanqu.road.server.cmd.activity.suitang;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.TongBingProto;
import com.yanqu.road.pb.activity.suitang.SuiTang;
import com.yanqu.road.server.cmd.CrossUnionCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.suitang.CrossSuiTangMgr;
import com.yanqu.road.server.manager.activity.suitang.activity.CrossSuiTangActivity;
import com.yanqu.road.server.manager.activity.tongbing.CrossTongBingMgr;
import com.yanqu.road.server.manager.activity.tongbing.activity.CrossTongBingActivity;
import com.yanqu.road.server.protocol.CrossProtocol;

@Cmd(code = CrossProtocol.C2_SUI_TANG_CITY_WAR_REPORT, desc = "")
public class CrossSuiTangCityWarReportCmd extends CrossUnionCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        SuiTang.CrossSuiTangCityWarReportReqMsg reqMsg = SuiTang.CrossSuiTangCityWarReportReqMsg.parseFrom(packet.getBytes());
        CrossSuiTangActivity activity = CrossSuiTangMgr.getActivity(reqMsg.getActivityId(), groupId);
        if (activity == null) {
            return true;
        }
        activity.setLastReqTime(packet.getPlayerId());
        activity.cityWarReport(packet.getPlayerId(), reqMsg.getReq().getIsSystemMsg());
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

    }

    @Override
    public void sendData() {

    }
}
